package com.home.s2g.entities;

import java.awt.*;
import java.awt.geom.Dimension2D;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;


public class Player implements Drawable , Controllable{

    private Point location;
    private Dimension dimension;

    public Player(Point location, Dimension dimension) {
        this.location = location;
        this.dimension = dimension;
    }

    @Override
    public void updateLocation(double x, double y) {
        setLocation(x,y);
    }

    @Override
    public void setSize(double width, double height) {
       dimension.setSize(width,height);
    }

    @Override
    public Dimension getSize() {
        return dimension;
    }

    @Override
    public Point getLocation() {
        return location;
    }

    @Override
    public void setLocation(double x, double y) {
        location.setLocation(x,y);
    }

    @Override
    public Rectangle getObject() {
        return new Rectangle(location,dimension);
    }
}
